// JavaScript Document
function menuFix() {
 var sfEls = document.getElementById("nav").getElementsByTagName("li");
 for (var i=0; i<sfEls.length; i++) {
  sfEls[i].onmouseover=function() {
  this.className+=(this.className.length>0? " ": "") + "sfhover";
  }
  sfEls[i].onMouseDown=function() {
  this.className+=(this.className.length>0? " ": "") + "sfhover";
  }
  sfEls[i].onMouseUp=function() {
  this.className+=(this.className.length>0? " ": "") + "sfhover";
  }
  sfEls[i].onmouseout=function() {
  this.className=this.className.replace(new RegExp("( ?|^)sfhover\\b"), 

"");
  }
 }
}
window.onload=menuFix;




if (!document.getElementById) {
	document.getElementById = function() { return null; }
}
function initializeMenu(currentId, actuatorId) {
	var menu = document.getElementById(currentId);
	var actuator = document.getElementById(actuatorId);
	if (menu == null || actuator == null) return;
	actuator.onclick = function() {
		var display = menu.style.display;
		menu.style.display = (display == "block") ? "none" : "block";
		return false;
	}
}
window.onload = function() {
	initializeMenu("productsMenu", "productsActuator");
	initializeMenu("newPhonesMenu", "newPhonesActuator");
	initializeMenu("compareMenu", "compareActuator");
	initializeMenu("linksMenu", "linksActuator");
}
